home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
744
/
fo2
/
sources_fo2
/
move.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-18
|
984b
|
58 lines
#include "defs.h"
Prototype MoveUserDirB(WORD oB,WORD nB);
Prototype MoveHashFils(WORD bloc,WORD parent);
MoveUserDirB(oB,nB)
WORD oB,nB;
{
struct SUserDirB *dlist;
struct UserDirB *adr;
WORD n;
#ifdef DEBUG
printf("in MoveUserDir() oB: %d, nB: %d\n",oB,nB);
#endif
dlist=whereB(oB);
if (dlist==0) NotSet(oB,6);
else
{
if (dlist->dl_Type==4)
{
adr=dlist->dl_AdrB;
dlist->dl_Bloc2=nB;
adr->HeaderKey=nB;
for (n=71;n!=-1;n--)
{
if (adr->HashTable[n])
{
MoveHashFils(adr->HashTable[n],nB);
}
}
return(nB+1);
} else puts("err in MoveUserDirB");
}
}
MoveHashFils(bloc,parent)
WORD bloc,parent;
{
struct DiskList *dlist;
struct FileHeaderB *adr;
#ifdef DEBUG
printf("in MoveHashFils() bloc: %d, parent: %d\n",bloc,parent);
#endif
do
{
dlist=whereB(bloc);
if (dlist==0) {NotSet(bloc,7); return(0);}
adr=dlist->dl_AdrB;
dlist->dl_types.dl_type4.dl_Parent=parent;
adr->ParentDir=parent;
bloc=adr->NextHash;
}
while (bloc);
}